package com.iedu.demo.lgq.mapper;

import com.iedu.demo.lgq.entity.City;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface ToolsMapper {

    @Update("update tb_item set image = #{fileName} where item_id =#{itemId}")
    void setPicUrl(String fileName, int itemId);

    @Select("SELECT * FROM city as lgq WHERE pid=#{pid}")
    List<City> selectRegionByPid(Integer pid);
}
